package com.yao.sys.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yao.sys.entity.UserEntity;

import lombok.Data;

/**
 * 用户表
 *
 * @author autoCode
 * @version 1.0.0-SNAPSHOT
 * @date 2020-04-09
 */
@Data
@TableName("sys_user")
public class UserDto extends UserEntity {

    @TableField(exist = false)
    private String sexDesc;

    /**
      * 角色id字符集
      */
    @TableField(exist = false)
    private String roleIds;

    public void fill(UserDto dto) {
        if (null != dto.getSex()) {
            dto.setSexDesc(dto.getSex().getDesc());
        }
    }

}